<template>
  <div>
    <p>苹果10元/斤 8折</p>
    <br />
    <div>
      请输入你要买的斤数：<input v-model="Jin" type="text" /><br />

      <button @click="fn">结账买单</button> <br />
      结账单 总价{{ 10 * Jin }}折后价{{ Jin * 10 * 0.8 }}省了{{
        Jin * 10 * 0.2
      }}
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      Jin: 0,
    };
  },
  model: {
    prop: "checked",
    event: "change",
  },
  props: {
    checked: {
      type: Boolean,
    },
  },
  methods: {
    fn() {
      this.$emit("change");
    },
  },
};
</script>

<style>
</style>
